package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.LogisticsCompanyMapper;
import com.example.shoppingmall.pojo.LogisticsCompany;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class LogisticsCompanyService {

    @Resource
    LogisticsCompanyMapper logisticsCompanyMapper;

   public  List<LogisticsCompany> getAll(int dang,int size){

       int num=(dang-1)*size;

       return  logisticsCompanyMapper.getAll(num,size);
   }

   public  int count(){

       return  logisticsCompanyMapper.count();
   }

    public int del(int id){

       return logisticsCompanyMapper.del(id);

    }

    public int updateLogisticsCompany(LogisticsCompany logisticsCompany){

        return logisticsCompanyMapper.updateLogisticsCompany(logisticsCompany);
    }

     public int addLogisticsCompany(LogisticsCompany logisticsCompany){

        return logisticsCompanyMapper.addLogisticsCompany(logisticsCompany);
     }

    public LogisticsCompany getById(int id){

         return logisticsCompanyMapper.getById(id);

    }

}
